Skip to content

Conversation

@slister1001
Copy link
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings November 6, 2025 15:42
@slister1001 slister1001 requested a review from a team as a code owner November 6, 2025 15:42
@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Nov 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds redaction functionality for sensitive adversarial prompts before logging results to App Insights. The changes prevent potentially harmful user messages from being logged for specific high-risk categories (prohibited actions, task adherence, and sensitive data leakage).

Key Changes

  • Added three new methods to ResultProcessor class: get_app_insights_redacted_results(), _should_redact_for_risk_category(), and _get_redacted_input_message()
  • Modified _finalize_results() in _red_team.py to use redacted results when logging to App Insights
  • Redaction replaces user messages with descriptive placeholders that include risk category, attack technique, and optional risk sub-type information

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_result_processor.py Adds three new methods to handle redaction of sensitive user messages for App Insights logging
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py Integrates the redaction functionality by calling the new method before emitting results to App Insights

@slister1001 slister1001 enabled auto-merge (squash) November 6, 2025 17:24
@slister1001 slister1001 merged commit 3f377c7 into Azure:main Nov 6, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Evaluation Issues related to the client library for Azure AI Evaluation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants